<template>
	<view  class="noticeList-page m-h100">
		<!-- <noneBox></noneBox> -->
		<view  class="flex flex-column bgcolor1 border-bottom p-2 msgitem" v-for="(item,index) in notices"  :key="index"  
		@click="navTo(`/pages/noticeList/details?title=${item.title}`,item)">
			<view  class="flex align-center">
				<image style="width: 20px;height: 20px;" src="/static/images/msg.png" mode="widthFix"></image>
				<text class="fs-28 ftcolor1 ml-1">{{item.department.name}}</text>
				<text class="fs-24 ftcolor4 px-2 py-1">射洪市</text>
			</view>
			<view class="fs-32 ftcolor1 my-1">{{item.title}}</view>
			<view class="ftcolor4 fs-24">2024-05-28 11:50:23</view>
		</view>
	</view>
</template>

<script>
	import baseApi from '@/api/baseApi.js'
	export default {
		data() {
			return {
				notices:[]
			}
		},
		created() {
			this.gz_pub_notice()
		},
		methods: {
			gz_pub_notice(){
				baseApi.gz_pub_notice().then(res =>  {
					this.notices  = res.data
				})
			},
			navTo(url,item){
				uni.setStorageSync('noticeItem',item)
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss">
.noticeList-page{
	.msgitem:last-child{
		border: 0;
	}
}
</style>
